package com.ai.entity.made.page;

import cn.hutool.core.util.StrUtil;
import com.ai.entity.BasePage;
import com.ai.entity.made.MaintenancePersonnelInformation;
import com.ai.entity.made.camera.CameraPO;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * @Author jiaok
 * @Date 2025-01-08 17:33
 */
@Data
public class MaintenancePersonnelInformationPage extends BasePage<MaintenancePersonnelInformation> {

    @ApiModelProperty(value = "录入组织id")
    private String regionBaseId;

    @ApiModelProperty(value = "工号")
    private String workNumber;

    @ApiModelProperty(value = "姓名")
    private String name;

    @ApiModelProperty(value = "部门")
    private String department;

    @ApiModelProperty(value = "射频号")
    private String radioFrequency;

    @ApiModelProperty(value = "职务")
    private String position;

    @ApiModelProperty(value = "工种")
    private String typeOfWork;

    @ApiModelProperty(value = "性别")
    private String sex;

    @ApiModelProperty(value = "矿灯号")
    private String miningLampNumber;

    @ApiModelProperty(value = "身份证号")
    private String idCard;


    @Override
    public QueryWrapper<MaintenancePersonnelInformation> getQuery(QueryWrapper<MaintenancePersonnelInformation> queryWrapper) {
        return super.getQuery(queryWrapper)
                .like(StrUtil.isNotBlank(workNumber), "work_number", workNumber)
                .like(StrUtil.isNotBlank(name), "name", name)
                .like(StrUtil.isNotBlank(regionBaseId),"region_base_id", regionBaseId)
                ;
    }
}
